<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>IoT物联网管理平台</title>
    <!--设置响应式方法-->
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'>

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
          integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
    <script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>

    <link rel="stylesheet" href="style/index.css">
    <script src="script/login.js" type="text/javascript"></script>

</head>


<body>

<div style="background-image: url(image/header.jpg)">
    <div class="container">
        <div class="page-header">
            <h2 class="headertext">慢阻肺患者家庭护理数据采集与控制系统</h2>
        </div>
    </div>
</div>

<nav class="my-nav">
    <div class="navbar navbar-inverse" >
        <div class="container">
            <div class="navbar-header">
                <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">首页</a>
            </div>
            <div class="navbar-collapse collapse" role="navigation">
                <ul class="nav navbar-nav" id="myNav">
                    <li><a href="html/systemInfo.html" >健康分析</a></li>
                    <li><a href="html/devManagement.html" >实时数据</a></li>
                    <li><a href="html/userManagement.html">个人信息</a></li>
                    <li class="hidden-sm"><a href="html/about.html">关于</a></li>
                </ul>
            </div>
        </div>
    </div>
</nav>

<section  class="content">
    <div class="jumbotron mainContent">
        <h1>IoT</h1>
        <p id="name"></p>
        <script>
            var name = localStorage.getItem("nickname")
            console.log(name)
            $("#name").text("Hello, " + name)
        </script>
       <p class="loginSuccess" style="color: grey"></p>
        <button class="btn btn-primary btn-lg" id="loginOut"><a href="./index.html" style="color: #FFFFFF">退出登录</a></button>
    </div>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3 class="modal-title modal-text" id="myModalLabel">管理员登录</h3>

                <form id="loginForm" onsubmit="return false" action="##" method="post">
                    <div class="modal-body">
                        <div class="container">
                            <div class="form-group form-input">
                                <label for="username">账号</label>
                                <div style="width: 30%">
                                    <input type="text" class="form-control" id="username" name="username" placeholder="请输入账号">
                                </div>
                            </div>
                            <div class="form-group form-input">
                                <label for="password">密码</label>
                                <div style="width: 30%">
                                    <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
                                </div>
                            </div>
                        </div>
                        <p class="alert" style="color: red; text-align: center"></p>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group" style="text-align: center">
                            <input type="button" class="btn btn-default btn-lg btn-primary" id="submit" onclick="login()" value="登录">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>

<footer>
    <div class="foot">
        <h5 style="text-align: center">网络编程课程团队项目  @  Coding</h5>
    </div>
</footer>

<script>
    isLogin()
</script>
</body>
</html>